<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Ext.CompositeElementLite</title>
        <link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
        <link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
        <link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
        <!-- GC -->
    </head>
    <body>
            <div class="body-wrap">
        <div class="top-tools">
        	<img src="../resources/print.gif" width="16" height="16" align="absmiddle">&nbsp;<a href="Ext.CompositeElementLite.html" target="_blank">Print Friendly</a><br/>

        </div>
        <h1>Class Ext.CompositeElementLite</h1>
        <table cellspacing="0">
            <tr><td class="label">Package:</td><td>Ext</td></tr>
            <tr><td class="label">Class:</td><td>CompositeElementLite</td></tr>
                        <tr><td class="label">Extends:</td><td><a ext:cls="Ext.CompositeElement" ext:member="" href="Ext.CompositeElement.html">CompositeElement</a></td></tr>
                                    <tr><td class="label">Defined In:</td><td><a href="CompositeElement.jss.html">CompositeElement.js</a></td></tr>
        </table>
        <div class="description">
            Flyweight composite class. Reuses the same Ext.Element for element operations.
 <pre><code>var els = Ext.select(<em>"#some-el div.some-class"</em>);
 <i>// or select directly from an existing element</i>
 <b>var</b> el = Ext.get(<em>'some-el'</em>);
 el.select(<em>'div.some-class'</em>);

 els.setWidth(100); <i>// all elements become 100 width</i>
 els.hide(true); <i>// all elements fade out and hide</i>
 <i>// or</i>
 els.setWidth(100).hide(true);</code></pre><br><br>
<b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
actions will be performed on all the elements in this collection.</b>        </div>
        <br />
        	<a href="#properties">Properties</a>
			&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#methods">Methods</a>
			&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#events">Events</a>
        	        <hr />
        <a name="properties"></a>
        <h2>Public Properties</h2>
        <div class="no-members">This class has no public properties.</div>        <a name="methods"></a>
        <h2>Public Methods</h2>
                <table cellspacing="0" class="member-table">
            <tr>
                <th class="sig-header" colspan="2">Method</th>
                <th class="msource-header">Defined By</th>
            </tr>
                <tr class=" inherited">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#add">add</a>(&nbsp;<code>String/Array els</code>&nbsp;) : CompositeElement</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#add" href="Ext.CompositeElement.html#add">CompositeElement</a></td>
    </tr>
    <tr class=" inherited">
        <td class="mdesc">Adds elements to this composite.</td>
    </tr>
        <tr class=" inherited alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#clear">clear</a>() : void</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#clear" href="Ext.CompositeElement.html#clear">CompositeElement</a></td>
    </tr>
    <tr class=" inherited alt">
        <td class="mdesc">Removes all elements.</td>
    </tr>
        <tr class=" inherited">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#contains">contains</a>() : Boolean</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#contains" href="Ext.CompositeElement.html#contains">CompositeElement</a></td>
    </tr>
    <tr class=" inherited">
        <td class="mdesc">Returns true if this composite contains the passed element</td>
    </tr>
        <tr class=" alt" expandable>
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#each">each</a>(&nbsp;<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : CompositeElement</td>
        <td class="msource" rowspan="2">CompositeElementLite</td>
    </tr>
    <tr class=" alt" expandable>
        <td class="mdesc">Calls the passed function passing (el, this, index) for each element in this composite. The element
passed is the fly...</td>
    </tr>
        <tr class=" inherited">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#fill">fill</a>(&nbsp;<code>String/Array els</code>&nbsp;) : CompositeElement</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#fill" href="Ext.CompositeElement.html#fill">CompositeElement</a></td>
    </tr>
    <tr class=" inherited">
        <td class="mdesc">Clears this composite and adds the elements returned by the passed selector.</td>
    </tr>
        <tr class=" inherited alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#filter">filter</a>(&nbsp;<code>String selector</code>&nbsp;) : CompositeElement</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#filter" href="Ext.CompositeElement.html#filter">CompositeElement</a></td>
    </tr>
    <tr class=" inherited alt">
        <td class="mdesc">Filters this composite to only elements that match the passed selector.</td>
    </tr>
        <tr class=" inherited">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#first">first</a>() : Ext.Element</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#first" href="Ext.CompositeElement.html#first">CompositeElement</a></td>
    </tr>
    <tr class=" inherited">
        <td class="mdesc">Returns the first Element</td>
    </tr>
        <tr class=" inherited alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#getCount">getCount</a>() : Number</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#getCount" href="Ext.CompositeElement.html#getCount">CompositeElement</a></td>
    </tr>
    <tr class=" inherited alt">
        <td class="mdesc">Returns the number of elements in this composite</td>
    </tr>
        <tr class=" inherited">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#indexOf">indexOf</a>() : Boolean</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#indexOf" href="Ext.CompositeElement.html#indexOf">CompositeElement</a></td>
    </tr>
    <tr class=" inherited">
        <td class="mdesc">Returns true if this composite contains the passed element</td>
    </tr>
        <tr class=" alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#item">item</a>(&nbsp;<code>Number index</code>&nbsp;) : Ext.Element</td>
        <td class="msource" rowspan="2">CompositeElementLite</td>
    </tr>
    <tr class=" alt">
        <td class="mdesc">Returns a flyweight Element of the dom element object at the specified index</td>
    </tr>
        <tr class=" inherited">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#last">last</a>() : Ext.Element</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#last" href="Ext.CompositeElement.html#last">CompositeElement</a></td>
    </tr>
    <tr class=" inherited">
        <td class="mdesc">Returns the last Element</td>
    </tr>
        <tr class=" inherited alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#removeElement">removeElement</a>(&nbsp;<code>Mixed el</code>, <span class="optional" title="Optional">[<code>Boolean removeDom</code>]</span>&nbsp;) : CompositeElement</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#removeElement" href="Ext.CompositeElement.html#removeElement">CompositeElement</a></td>
    </tr>
    <tr class=" inherited alt">
        <td class="mdesc">Removes the specified element(s).</td>
    </tr>
        <tr class=" inherited">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#replaceElement">replaceElement</a>(&nbsp;<code>String/HTMLElement/Element/Number el</code>, <code>String/HTMLElement/Element replacement</code>, <span class="optional" title="Optional">[<code>Boolean domReplace</code>]</span>&nbsp;) : CompositeElement</td>
        <td class="msource" rowspan="2"><a ext:cls="Ext.CompositeElement" ext:member="#replaceElement" href="Ext.CompositeElement.html#replaceElement">CompositeElement</a></td>
    </tr>
    <tr class=" inherited">
        <td class="mdesc">Replaces the specified element with the passed element.</td>
    </tr>
            </table>
                <a name="events"></a>
        <h2>Public Events</h2>
        <div class="no-members">This class has no public events.</div>                
        
                    <h2 class="mdetail-head">Method Details</h2>
            <div class="detail-wrap">
                            <a name="add"></a>
                <div class="mdetail">
                <h3>add</i></h3>
                <code>public function add(&nbsp;<code>String/Array els</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Adds elements to this composite.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>els</code> : String/Array<div class="sub-desc">A string CSS selector, an array of elements or an element</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#add" href="Ext.CompositeElement.html#add">CompositeElement</a>.</div>
                </div>
                            <a name="clear"></a>
                <div class="mdetail alt">
                <h3>clear</i></h3>
                <code>public function clear()</code>
                <div class="mdetail-desc">
                    Removes all elements.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>void</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#clear" href="Ext.CompositeElement.html#clear">CompositeElement</a>.</div>
                </div>
                            <a name="contains"></a>
                <div class="mdetail">
                <h3>contains</i></h3>
                <code>public function contains()</code>
                <div class="mdetail-desc">
                    Returns true if this composite contains the passed element
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Boolean</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#contains" href="Ext.CompositeElement.html#contains">CompositeElement</a>.</div>
                </div>
                            <a name="each"></a>
                <div class="mdetail alt">
                <h3>each</i></h3>
                <code>public function each(&nbsp;<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;)</code>
                <div class="mdetail-desc">
                    Calls the passed function passing (el, this, index) for each element in this composite. <b>The element
passed is the flyweight (shared) Ext.Element instance, so if you require a
a reference to the dom node, use el.dom.</b>
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>fn</code> : Function<div class="sub-desc">The function to call</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The <i>this</i> object (defaults to the element)</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by CompositeElementLite.</div>
                </div>
                            <a name="fill"></a>
                <div class="mdetail">
                <h3>fill</i></h3>
                <code>public function fill(&nbsp;<code>String/Array els</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Clears this composite and adds the elements returned by the passed selector.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>els</code> : String/Array<div class="sub-desc">A string CSS selector, an array of elements or an element</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#fill" href="Ext.CompositeElement.html#fill">CompositeElement</a>.</div>
                </div>
                            <a name="filter"></a>
                <div class="mdetail alt">
                <h3>filter</i></h3>
                <code>public function filter(&nbsp;<code>String selector</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Filters this composite to only elements that match the passed selector.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>selector</code> : String<div class="sub-desc">A string CSS selector</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#filter" href="Ext.CompositeElement.html#filter">CompositeElement</a>.</div>
                </div>
                            <a name="first"></a>
                <div class="mdetail">
                <h3>first</i></h3>
                <code>public function first()</code>
                <div class="mdetail-desc">
                    Returns the first Element
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Element</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#first" href="Ext.CompositeElement.html#first">CompositeElement</a>.</div>
                </div>
                            <a name="getCount"></a>
                <div class="mdetail alt">
                <h3>getCount</i></h3>
                <code>public function getCount()</code>
                <div class="mdetail-desc">
                    Returns the number of elements in this composite
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Number</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#getCount" href="Ext.CompositeElement.html#getCount">CompositeElement</a>.</div>
                </div>
                            <a name="indexOf"></a>
                <div class="mdetail">
                <h3>indexOf</i></h3>
                <code>public function indexOf()</code>
                <div class="mdetail-desc">
                    Returns true if this composite contains the passed element
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Boolean</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#indexOf" href="Ext.CompositeElement.html#indexOf">CompositeElement</a>.</div>
                </div>
                            <a name="item"></a>
                <div class="mdetail alt">
                <h3>item</i></h3>
                <code>public function item(&nbsp;<code>Number index</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Returns a flyweight Element of the dom element object at the specified index
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>index</code> : Number<div class="sub-desc"></div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Element</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by CompositeElementLite.</div>
                </div>
                            <a name="last"></a>
                <div class="mdetail">
                <h3>last</i></h3>
                <code>public function last()</code>
                <div class="mdetail-desc">
                    Returns the last Element
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Element</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#last" href="Ext.CompositeElement.html#last">CompositeElement</a>.</div>
                </div>
                            <a name="removeElement"></a>
                <div class="mdetail alt">
                <h3>removeElement</i></h3>
                <code>public function removeElement(&nbsp;<code>Mixed el</code>, <span class="optional" title="Optional">[<code>Boolean removeDom</code>]</span>&nbsp;)</code>
                <div class="mdetail-desc">
                    Removes the specified element(s).
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>el</code> : Mixed<div class="sub-desc">The id of an element, the Element itself, the index of the element in this composite
or an array of any of those.</div></li><li><code>removeDom</code> : Boolean<div class="sub-desc">(optional) True to also remove the element from the document</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#removeElement" href="Ext.CompositeElement.html#removeElement">CompositeElement</a>.</div>
                </div>
                            <a name="replaceElement"></a>
                <div class="mdetail">
                <h3>replaceElement</i></h3>
                <code>public function replaceElement(&nbsp;<code>String/HTMLElement/Element/Number el</code>, <code>String/HTMLElement/Element replacement</code>, <span class="optional" title="Optional">[<code>Boolean domReplace</code>]</span>&nbsp;)</code>
                <div class="mdetail-desc">
                    Replaces the specified element with the passed element.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>el</code> : String/HTMLElement/Element/Number<div class="sub-desc">The id of an element, the Element itself, the index of the element in this composite
to replace.</div></li><li><code>replacement</code> : String/HTMLElement/Element<div class="sub-desc">The id of an element or the Element itself.</div></li><li><code>domReplace</code> : Boolean<div class="sub-desc">(Optional) True to remove and replace the element in the document too.</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>CompositeElement</code><div class="sub-desc">this</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by <a ext:cls="Ext.CompositeElement" ext:member="#replaceElement" href="Ext.CompositeElement.html#replaceElement">CompositeElement</a>.</div>
                </div>
                        </div>
        
                
        </div>
    <hr>
    <div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright &copy; 2006-2007 Ext JS, LLC<br />All rights reserved.</div>

    </body>
</html>